package com.dahaiwuliang.code.util;

import org.apache.shiro.crypto.hash.Md5Hash;

/**
 * 加密工具
 */
public class CryptographyUtil {
    public  final  static String SALT="code";

/**
 * md5加密
 */
    public static  String MD5(String str, String salt){

        return  new Md5Hash(str,salt).toString();
    }

    public static void main(String[] args) {
        String name="12346";
        System.out.println(CryptographyUtil.MD5(name,SALT));
    }
}
